# Eaely Pause

import time
import math

scale = 50
pi = 3.1415926

print("执行开始".center(scale//2,"-"))

start = time.perf_counter()

for i in range(scale+1):

    r = i/scale
    e = r + (1 - math.sin(r * pi *2 + pi/2))/-8
    a = '*'* int(scale * e)
    b = '.'* int(scale * (1 - e))
    c = e * 100
    dur = time.perf_counter()-start

    print("\r{:^3.0f}%[{}->{}]{:.2f}s".format(c,a,b,dur),end="")

    time.sleep(0.1)

print("\n"+"执行结果".center(scale//2,'-'))
